home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 010a / frmtmstr.zip / PATHINFO.TXT < prev    next >
Text File  |  1990-01-09  |  6KB  |  108 lines

  1.  
  2.              INFORMATION ON THE DOS ENVIRONMENT PATH STRING
  3.              ----------------------------------------------
  4.  
  5.           All versions of PC and MS DOS above 2.0 maintain an area in 
  6.      memory called the environment.  The environment contains a series of 
  7.      text strings that are used by DOS and applications programs for 
  8.      various purposes.  You can see what strings are currently in the 
  9.      enviroment by typing SET and pressing <RETURN> from the DOS level.  As 
  10.      a minimum, the environment will contain the string COMSPEC= followed 
  11.      by a DOS directory path and (usually) COMMAND.COM.  Most hard disk 
  12.      equipped machines will show the following COMSPEC string:
  13.  
  14.                          COMSPEC=C:\COMMAND.COM
  15.  
  16.           Other strings that frequently appear in the environment are the 
  17.      PROMPT= and PATH= strings.  Control of the environment is effected
  18.      through the DOS SET command, which may be entered at the DOS level or 
  19.      from a batch (like AUTOEXEC.BAT) file.  For example, if a user desired 
  20.      that DOS used a copy of COMMAND.COM that was in a directory named
  21.      C:\DOS, he/she might place the command SET COMSPEC=C:\DOS\COMMAND.COM 
  22.      in the AUTOEXEC.BAT file.  After booting, DOS would load COMMAND.COM 
  23.      from C:\DOS each time it needed to reload the command interpreter.  
  24.      All other copies of COMMAND.COM in the system would be superfluous and 
  25.      ignored by DOS.
  26.           One very useful string that can be placed in the DOS environment 
  27.      by the user is the PATH= string.  When the name of an executable file 
  28.      is issued from the DOS level, DOS will first look in the current 
  29.      subdirectory for the file.  If it finds it, it loads and executes it 
  30.      and all is fine.  If it cannot find the file in the current directory, 
  31.      DOS will search the environment for the PATH= designator.  If one 
  32.      exists, DOS will start searching the system directories that are in the
  33.      PATH= string for the executable file.  For example, suppose that
  34.      the AUTOEXEC.BAT contains the command SET PATH=C:\DOS;D:\UTIL;E:\JUNK.
  35.      Note that directory path names are separated by semicolons and can 
  36.      (and should) include the drive designator.  Now further suppose that 
  37.      the user is in a directory named D:\SOMENAME and desires to run the 
  38.      program MYPROG.EXE, but MYPROG.EXE is not located in D:\SOMENAME.
  39.      When the user enters MYPROG, DOS, unable find it in the current
  40.      directory, starts searching the directories in the PATH= string 
  41.      starting with C:\DOS.  If MYPROG.EXE was in D:\UTIL, DOS would load 
  42.      and execute the program and D:\UTIL would be the active directory when 
  43.      the program received control from DOS.  Obviously, if DOS cannot find 
  44.      MYPROG.EXE in any of directories in the PATH= string, the message BAD 
  45.      COMMAND OR FILENAME will be displayed.
  46.           The exact same sequence is followed if a running program calls 
  47.      DOS to execute a program but with one possible important difference.  
  48.      For technical reasons, some programs (like FMTMAS) need to load a
  49.      secondary copy of COMMAND.COM and then pass the name of the program to 
  50.      be executed to COMMAND.COM.  This is accomplished by searching the 
  51.      environment string for the COMSPEC= string to locate COMMAND.COM, 
  52.      changing to that directory, and telling DOS to load COMMAND.COM.  The 
  53.      command passed to DOS might look somethin like this:
  54.  
  55.                            COMMAND.COM MYPROG.EXE
  56.  
  57.      This tells DOS to run COMMAND.COM and for COMMAND.COM to load and 
  58.      execute MYPROG.EXE.  Even if MYPROG.EXE were located in the active 
  59.      directory when the applications program passed this command to DOS, 
  60.      COMMAND.COM might not find MYPROG.EXE because the applications program 
  61.      switched to the directory where COMMAND.COM was located in order to
  62.      start things rolling.  Therefore, unless MYPROG.EXE was in a directory 
  63.      contained in the PATH= string or in the same directory as COMMAND.COM, 
  64.      DOS would not find it.
  65.          FormatMaster depends upon the presence of SYS.COM transfer system
  66.      files to a freshly formatted diskette.  It calls SYS.COM by using the
  67.      command sequence just described and therefore cannot transfer the
  68.      files if DOS cannot find SYS.COM when called to load it.  Suppose 
  69.      SYS.COM resides in a directory named C:\DOS.  Placing the following 
  70.      command in your AUTOEXEC.BAT file and rebooting will ensure that 
  71.      SYS.COM can be found when needed:
  72.  
  73.                              PATH=C:\DOS
  74.  
  75.      Obviously, the PATH= string can contain other directory path names and 
  76.      you may already have a PATH= command in your AUTOEXEC.BAT file.  If 
  77.      so, just add the directory containing the archive system files to the 
  78.      string.  For maximum speed, make it the first directory name in the 
  79.      string.
  80.           When FormatMaster loads it will search your system environment
  81.      to find the location of COMMAND.COM.  This is automatic and requires 
  82.      nothing on your part.  The only problem that could occur is in a 
  83.      system that is using a command intreperter other than COMMAND.COM (a 
  84.      **very** rare situation).
  85.  
  86.      You may specify an exact location for FMTMAS.EXE by placing the
  87.      following command in your AUTOEXEC.BAT file:
  88.  
  89.                           set FMLOC=C:\XXXX\...
  90.  
  91.      Where C:\XXXX\... should be replaced the the actual DOS path name
  92.      of the directory in which FMTMAS.EXE is located.  Be SURE to
  93.      place the drive letter and colon in the string!
  94.  
  95.      You may specify that FormatMaster use 9 sectors in lieu of 10
  96.      sectors when formatting a 360K disk in a 1.2 drive.  This will
  97.      force FormatMaster to format a 360K disk to 720K instead of 800K
  98.      for those systems where the 800K option will not work.  Place the
  99.      following command in the AUTOEXEC.BAT file:
  100.  
  101.                           set FMSEC=9
  102.  
  103.      NOTE:  It is **important** that DOS 2.x users use CAPS when entering
  104.             path commands into the environment.  DOS 3.x automatically
  105.             changes all characters to upper case but DOS 2.x does not.
  106.  
  107.      Copyright 1988/89/90 by New-Ware, All Rights Reserved.
  108.